#include #include #include using namespace std; void main () { float f = 12.1273345; int i; cin >> f; i = (f + .005) * 1000; // 12132 i = i /10; //1213 f = i / 100.0; cout << f; //int month = 0; //int monthsToDisplay = 0; //float balance = 0; //float contribution = 0; //float interestRate = 0; //float earningsThisMonth = 0; //float totalEarnings = 0; //cout << "Initial Balance? "; //cin >> balance; //cout << "Monthly contribution? "; //cin >> contribution; //cout << "Interest Rate? "; //cin >> interestRate; //char c; //cout << "(M)onths or (Y)ears?"; //cin >> c; //if( c == 'M') //{ // cout << "Months to Display? "; // cin >> monthsToDisplay; //} //else //{ // cout << "Years to Display? "; // cin >> monthsToDisplay; // monthsToDisplay *= 12; //} //cout.precision(2); //cout.setf(ios_base::fixed); // //while( month < monthsToDisplay) //{ // earningsThisMonth = balance * (interestRate / 1200); // totalEarnings += earningsThisMonth; // balance += earningsThisMonth; // month++; // cout << setw(5) << month; // cout << setw(10) << earningsThisMonth; // cout << setw(15) << balance << endl; // balance += contribution; //} //cout << "Total earnings = " << totalEarnings << endl; //cout << "Total contributions = " << balance - totalEarnings << endl; }